package com.boot.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.boot.dao.ItemDao;
import com.boot.entity.Item;
import com.boot.entity.Stats;
import com.boot.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单详情表(Item)表服务实现类
 *
 * @author makejava
 * @since 2023-07-20 18:48:25
 */
@Service("itemService")
public class ItemServiceImpl extends ServiceImpl<ItemDao, Item> implements ItemService {

    @Autowired
    private ItemDao itemDao;


    /**
     * 统计销量前十的商品
     * @return
     */
    @Override
    public List<Stats> queryItemAndProductSales() {

        List<Stats> list = itemDao.selectItemAndProductSales();

        return list;
    }
}

